package com.hotelcrs.hotelcrsapi.service;


import com.hotelcrs.hotelcrsapi.pojo.HotelRole;
import com.hotelcrs.hotelcrsapi.repository.HotelRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class HotelService implements IHotelService{
    @Autowired
    private HotelRepository hotelRepository;

    @Override
    public List<HotelRole> getAllRole() {
        List<HotelRole> roles = new ArrayList<>();
        for (HotelRole role : hotelRepository.findAll()) {
            roles.add(role);
        }
        return roles;
    }
}
